﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.controllers.world {
    import flash.events.*;
    import net.wooga.pets.events.*;
    import net.wooga.pets.interfaces.*;
    import net.wooga.pets.models.world.vos.actors.machines.*;
    import net.wooga.pets.constants.*;
    import org.robotlegs.mvcs.*;

    public class SetNextTreatmentStateCommand extends Command {

        public var event:InfoEvent;

        override public function execute():void{
            var _local1:IMachine = (this.event.info as IMachine);
            var _local2:String = TreatmentMachineVO.getNextState(_local1.state);
            if (_local2){
                _local1.state = _local2;
            } else {
                dispatch(new Event(EventConstants.HANDLE_NEXT_AVATAR_ACTION));
            };
        }

    }
}//package net.wooga.pets.controllers.world 
